<?php

namespace api\utils;

class StringUtil
{
    public static function isEmpty($string)
    {
        if (is_array($string)) {
            return empty($string);
        }
        return $string === null || trim($string) === '';
    }

    public static function isPhone($string)
    {
        return preg_match("/^1[3456789]\d{9}$/", $string);
    }
}
